/*
 * Font.cpp
 *
 *  Created on: Jul 18, 2009
 *      Author: kurt
 */

#include "Font.h"
#include "GraphicsInstance.h"
#include "Sprite.h"
#include <cstdarg>
#include <cstdlib>
using namespace std;
using namespace objdraw;

Font::Font(const Font & f)
{
	
}
Font::~Font() 
{
	if(font != NULL)
		font->Delete();
	font = NULL;
}

Font::Font() 
{
	font = NULL;
}
Font::Font(string file, unsigned int opts)
{
	font = NULL;
}
void Font::setStyle(float size, Color color, Color shadowColor, unsigned int options)
{
	
}
void Font::setEncoding(unsigned int options)
{
	
}
void Font::setAlternateFont(Font * f)
{
	
}
bool Font::fontIsLoaded()
{
	return font == NULL ? false : true;
}
Sprite * Font::getFont()
{
	return font;
}
float Font::print(float x, float y, const char * text)
{
	return 0.0f;
}
float Font::printf(float x, float y, const char * text, ...)
{
	if(font != NULL)
	{
		char buff[500];
		va_list args;
		va_start(args,text);
		vsprintf(buff,text,args);
		va_end(args);
		return this->print(x,y,buff);
	}
	return 0.0f;
}
float Font::measureText(const char * text)
{	
	return 0.0f;
}
float Font::measureTextEx(const char * text, int length)
{
	return 0.0f;
}
